<template>
  <div class="vehicleDetail">
    <div class="vehicleForm">
      <el-form :disabled="true" :model="vehicleForm" ref="vehicleForm" label-width="120px" class="demo-ruleForm" size="mini">
        <el-form-item label="业务类型" prop="veType">
          <el-input v-model="vehicleForm.veType"></el-input>
        </el-form-item>
        <el-form-item label="车牌号" prop="veNumber">
          <el-input v-model="vehicleForm.veNumber"></el-input>
        </el-form-item>
        <el-form-item label="申请时间" prop="veNumber">
          <el-input v-model="vehicleForm.veTime">
          </el-input>
        </el-form-item>
        <el-form-item label="审核意见" prop="approStatus">
          <el-input v-model="vehicleForm.approStatus"></el-input>
        </el-form-item>
        <el-form-item label="审核备注" prop="approNote">
          <el-input type="textarea" v-model="vehicleForm.approNote" ></el-input>
        </el-form-item>
        <el-form-item label="审核时间" prop="approStatus">
          <el-input v-model="vehicleForm.approTime"></el-input>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
import {getApprovalByVeApplyId} from "@/api/allApi";
import moment from "moment/moment";

export default {
  name: "VehicleDetail",
  data() {
    return{
      vehicleForm:{},
    }
  },
  created() {
    this.user = JSON.parse(window.localStorage.getItem('access-user'))
  },
  methods: {
    getApprovalByVeApplyId() {
      getApprovalByVeApplyId(this.$route.params.veApplyId).then(res=>{
        this.vehicleForm = res.data.data
        if (this.vehicleForm.approStatus == 1){
          this.vehicleForm.approStatus = "通过"
        }else if (this.vehicleForm.approStatus == 0){
          this.vehicleForm.approStatus = "不通过"
        }else {
          this.vehicleForm.approStatus = "待审核"
        }
        this.vehicleForm.veTime = moment(this.vehicleForm.veTime).format("YYYY-MM-DD HH:mm:ss")
        this.vehicleForm.approTime = moment(this.vehicleForm.approTime).format("YYYY-MM-DD HH:mm:ss")
      })
    }
  },
  mounted() {
    this.getApprovalByVeApplyId()
  }
}
</script>

<style scoped>

</style>